package com.woniu.apartment.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.woniu.apartment.mapper.FacilityMapper;
import com.woniu.apartment.domain.Facility;
import com.woniu.apartment.service.IFacilityService;

/**
 * 公寓设施或服务Service业务层处理
 * 
 * @author yy
 * @date 2023-04-03
 */
@Service
public class FacilityServiceImpl implements IFacilityService 
{
    @Autowired
    private FacilityMapper facilityMapper;

    /**
     * 查询公寓设施或服务
     * 
     * @param id 公寓设施或服务主键
     * @return 公寓设施或服务
     */
    @Override
    public Facility selectFacilityById(Long id)
    {
        return facilityMapper.selectFacilityById(id);
    }

    /**
     * 查询公寓设施或服务列表
     * 
     * @param facility 公寓设施或服务
     * @return 公寓设施或服务
     */
    @Override
    public List<Facility> selectFacilityList(Facility facility)
    {
        return facilityMapper.selectFacilityList(facility);
    }

    /**
     * 新增公寓设施或服务
     * 
     * @param facility 公寓设施或服务
     * @return 结果
     */
    @Override
    public int insertFacility(Facility facility)
    {
        return facilityMapper.insertFacility(facility);
    }

    /**
     * 修改公寓设施或服务
     * 
     * @param facility 公寓设施或服务
     * @return 结果
     */
    @Override
    public int updateFacility(Facility facility)
    {
        return facilityMapper.updateFacility(facility);
    }

    /**
     * 批量删除公寓设施或服务
     * 
     * @param ids 需要删除的公寓设施或服务主键
     * @return 结果
     */
    @Override
    public int deleteFacilityByIds(Long[] ids)
    {
        return facilityMapper.deleteFacilityByIds(ids);
    }

    /**
     * 删除公寓设施或服务信息
     * 
     * @param id 公寓设施或服务主键
     * @return 结果
     */
    @Override
    public int deleteFacilityById(Long id)
    {
        return facilityMapper.deleteFacilityById(id);
    }
}
